package com.wuzheng.wisgo.sanitation.cloud.repository.mapper.gis;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.wuzheng.wisgo.sanitation.cloud.repository.entity.gis.MapBase;
import com.wuzheng.wisgo.sanitation.cloud.repository.entity.tbox.ReceiveInfo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 经纬度转换 Mapper 接口
 *
 * @author sp
 * @since 2019-10-16
 */
public interface MapBaseMapper extends BaseMapper<MapBase> {

    /*
     * @MethodName: selectByVehId
     * @Description: TODO 通过联合主键查询数据
     * @Param: [tLongitude, tLatitude, tMapType]
     * @Return: java.util.List<com.wuzheng.wisgo.sanitation.cloud.repository.entity.tbox.ReceiveInfo>
     * @Author: sunpeng
     * @Date: 2019/11/15
    **/
    @Select("SELECT count(id) " +
            "FROM t_map_base  " +
            "WHERE t_longitude=#{tLongitude} AND t_latitude=#{tLatitude} AND t_map_type=#{tMapType} ")
    int selectByVehId(@Param("tLongitude") Double tLongitude,@Param("tLatitude") Double tLatitude,@Param("tMapType") String tMapType);
}
